package com.xlzcx.xltz.utils;

import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * 作者: 李咨辰
 * 文件名: MyJedisPoolConfig.java
 * 路径: com.yuntu.redisdemo.demos.web
 * 时间: 2024-05-27 11:25
 * 版本: 1.0
 * 描述: TODO redis
 **/
public class MyJedisPoolConfig {
    private static class innerClass {
        private static final JedisPool jedisPool = new JedisPool();

        private static JedisPoolConfig jedisPoolConfig() {
            JedisPoolConfig poolConfig = new JedisPoolConfig();
            poolConfig.setMaxIdle(10000);//最大连接数
            poolConfig.setMaxIdle(50);//最多空闲数
            return poolConfig;
        }
    }

    public static JedisPool getJedisPool() {
        return innerClass.jedisPool;
    }
}
